package com.Spring.Bean.collections;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	
	
  public static void main(String[] args) {
	ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
//	Person p =(Person)ctx.getBean("person3");
//	System.out.println(p.toString());
	//通过map来创建
//	NewPerson p =(NewPerson)ctx.getBean("NewPerson");
//	System.out.println(p.toString());
	//通过util来创建引用的集合
	Person p4 = (Person)ctx.getBean("person4");
	System.out.println(p4.toString());
	//通过p命名空间来进行bean的初始化
	Person p5 = (Person)ctx.getBean("person5");
	System.out.println(p5.toString());
	
}
}
